import 'package:flutter/material.dart';

class LoadingDialog  extends Dialog {
@override
Widget build(BuildContext context) {
  print("Loading context = ${context.toString()}");
  // TODO: implement build
  return Dialog(
    shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8.0))),
    backgroundColor: Colors.white,
    child: LoadingDialogWidget(),
  );

}
}
class LoadingDialogWidget extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    print("LoadingDialogWidget context = ${context.toString()}");
    return new Container(
      width: 100,
      height: 100,
      decoration: ShapeDecoration(
        color: Color(0xffffffff),
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.all(
            Radius.circular(8.0),
          ),
        ),
      ),
      child: new Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          new CircularProgressIndicator(),
          new Padding(
            padding: const EdgeInsets.only(
              top: 20.0,
            ),
            child: new Text(
              "正在加载",
              style: new TextStyle(fontSize: 12.0),
            ),
          ),
        ],
      ),
    );
  }
  
}